#!/usr/bin/perl -w
## Copyright (c) 2012 by Alex

#print "enter value\n";
$what = 'fred|barney';
$_ = 'fredfredfred';
while () {
 if (/($what){3}/) {
 print "$_\n";
 last;
 } else {
 print "No match\n";
 last;
 }
}
